﻿using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web.Mvc;
using SmesharikiMVC.Models.VideoCollection;


namespace SmesharikiMVC.Areas.Admin.Controllers
{
    public class AdminController : Controller
    {
        private VideoCollectionContext db = new VideoCollectionContext();
        
        //
        // GET: /Admin/

        [Authorize]
        public ActionResult Index()
        {
            List<AlbumVideo> albumVideos = db.AlbumVideos
                           .Include(a => a.VideoAlbum)
                           .Include(v => v.YoutubeVideo)
                           .ToList();

            return View(albumVideos);
        }

    }
}
